// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// 各手机浏览器的适配
import 'styles/reset.css'
// 1像素问题解决
import 'styles/border.css'
// iconfont 
import 'styles/iconfont.css'
import fastClick from 'fastclick'
// 轮播图
import VueAwesomeSwiper from 'vue-awesome-swiper'
// require styles
import 'swiper/dist/css/swiper.css'


Vue.config.productionTip = false

// 解决某些机型click延时300ms的问题

fastClick.attach(document.body)

Vue.use(VueAwesomeSwiper)

//字符串长度过滤器
Vue.filter('controStr',function(str,lenght){


  if(str.lenght <= lenght)
  {
   console.log(str);
    
    return str;
  }
  else
  {
    return str.substr(0,lenght-1) + '...';
  }
});

//引入axios
import Axios from 'axios'
//挂载
Vue.prototype.$axios = Axios;


// axios引入结束
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
